<div class="wrapper">
    <div id="body" style="padding-top: 15px;">

        <div id="content321" class="clearfix <?=$page?>-content">

            <? if($page == 'rentacar'){?>

                <!--<div class="platform" style="padding: 0;"> 
                    <a href="<?=base_url('rentacar')?>" class="demo rentacar-demo" style="top: 19px;">Online Demo</a> 
                </div> -->

                <?}else  if($page == 'excursions'){?>

<!--                    <div class="platform" style="padding: 0;">
                        <a href="<?=base_url('excursions')?>" class="demo excursions-demo" style="top: 19px;">Online Demo</a> 
                    </div>-->

                    <?}?> 

            <? if($page == 'cms'){?>

                <!--PRO GALLERY-->
                <div id="to_remove" style="display: none;">
                    <div id="pro-gallery" class="clearfix">

                        <div class="contect-banner2">
                            <img src="<?=$url;?>assets/img/banners/cms-banner_02_<?=$this->lang->lang()?>.jpg" alt="<?=lang('nav.cms-pro')?>" title="<?=lang('nav.cms-pro')?>" />
                        </div>
                        <div class="contect-banner1">
                            <img src="<?=$url;?>assets/img/banners/cms-banner_01_<?=$this->lang->lang()?>.jpg" alt="<?=lang('nav.cms-pro')?>" title="<?=lang('nav.cms-pro')?>" />
                        </div>

                    </div>
                </div>

                <?}else{ ?>
                <!--PRO GALLERY-->
                <div id="to_remove" style="display: none;">
                    <div id="pro-gallery" class="clearfix">

                        <div class="contect-banner2">
                            <img src="<?=$url;?>cms-pro/pro-gallery/<?=$platform['path_gallery']?>/<?=$pictures[1]['filename']?>" alt="<?=$title?>" title="<?=$title?>" />
                        </div>
                        <div class="contect-banner1">
                            <img src="<?=$url;?>cms-pro/pro-gallery/<?=$platform['path_gallery']?>/<?=$pictures[0]['filename']?>" alt="<?=$title?>" title="<?=$title?>" />
                        </div>

                    </div>
                </div>
                <?} ?>



            <!--TEXT-->
            <div class="contect-text">
                <?=$platform['content'];?>
            </div>

            <form action="<?=base_url('notification_mail')?>" method="post" id="contact_info" name="contact_info">  
                <input type="hidden" name="title" value="Rentacar" />
                <div class="contact_form">
                    <div class="form_inner">
                        <div class="clearfix">
                            <div class="form_contacts">

                                <div class="form_line clearfix"><label for="name"><b class="required">*</b><?=lang('contact.name')?>:</label><input type="text" class="input_text" value="" name="name" id="name"></div>
                                <div class="form_line clearfix"><label for="mobile"><b class="required">*</b><?=lang('contact.mobile')?>:</label><input type="text" class="input_text" value="" name="mobile" id="mobile"></div>
                                <div class="form_line clearfix last"><label for="email"><b class="required">*</b><?=lang('contact.email')?>:</label><input type="text" class="input_text" value="" name="email" id="email"></div>

                            </div>

                            <div class="form_title"><?=lang('contact.form')?></div>
                        </div>
                        <div class="form_line">
                            <label for="notice" style="text-align: left;"><?=lang('contact.message')?></label>
                            <textarea name="notice" id="notice"></textarea>
                        </div>
                        <div class="form_submit clearfix">
                            <input type="submit" value="<?=lang('contact.send')?>" name="contact_info_submit" id="contact_info_submit" class="submit">
                            <div class="explanded"> 
                                <span class="note-asterisk">*</span>
                                <span class="note-text"><?=lang('contact.fields')?></span>
                            </div>
                        </div>
                    </div>
                </div>
            </form>

            <script type="text/javascript">

                // Override default error message
                jQuery.validator.messages.required = "";

                // Override generation of error label
                jQuery("#contact_info").validate({
                    rules: {
                        name: "required",
                        mobile: "required",
                        email: {
                            required: true,
                            email: true
                        },
                        notice:"required"
                    },
                    submitHandler: function(form) {

                        jQuery('#contact_info_submit').attr('disabled','disabled');
                        var form = jQuery("#contact_info");
                        var form_data = form.serialize();

                        jQuery.ajax({
                            url: form.attr('action'),
                            dataType: 'json',
                            type: "POST",
                            data: form_data,
                            success: function (data, textStatus, xhr) {

                                if(data.action){
                                    alert(data.msg);
                                }else{
                                    alert(data.msg);                            
                                }
                                jQuery('#contact_info_submit').removeAttr('disabled');
                            },
                            error: function (xhr, textStatus, errorThrown) {
                                alert('Error ocured...\n Server not found.');
                                jQuery('#contact_info_submit').removeAttr('disabled');
                                that.busy("hide");
                            }
                        });

                        return false;

                    },
                    errorPlacement: function(error, element){}


                });

                jQuery('#contact_info_submit').removeAttr('disabled');

            </script>

        </div>

    </div>
</div>
